package com.ve.clexer.tree;

public class Node {
    public String name;
    public Node father;
    public int row;

    public Node(String name) {
        this.name = name;
    }

    public Node() {
    }


    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }


    public String getAbstractPosition() {
        return "::" + name;
    }

    public boolean isRoot() {
        return father == null;
    }

    @Override
    public boolean equals(Object obj) {
        Node node = (Node) obj;
        return father == node.father && name.equals(node.name);
    }

    @Override
    public int hashCode() {
        return name.hashCode() + father.hashCode();
    }


}
